package com.dingpeikeji.quickdeer.modules.rentproduct.service;

import java.util.Date;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.StringUtils;

import com.dingpeikeji.quickdeer.core.common.service.CrudService;
import com.dingpeikeji.quickdeer.core.modules.sys.utils.UserUtils;
import com.dingpeikeji.quickdeer.modules.rentproduct.dao.DiscountDao;
import com.dingpeikeji.quickdeer.modules.rentproduct.entity.DiscountFactor;
import com.dingpeikeji.quickdeer.modules.rentproduct.entity.OfficeSave;

@Service
@Transactional(readOnly = true)
public class DiscountService {
	@Autowired
	private DiscountDao DiscountDao;
	
	@Transactional(readOnly = false)
	public void save(DiscountFactor discountfactor) {
			DiscountDao.save(discountfactor);
	}
	
	@Transactional(readOnly = false)
	public void update(DiscountFactor discountfactor) {
			DiscountDao.update(discountfactor);
	}
		
	public List<DiscountFactor> getList(DiscountFactor discountfactor){		
	      return DiscountDao.get(discountfactor);
	}
	
	public DiscountFactor getDiscountByLevel(DiscountFactor discountfactor){
		return DiscountDao.getDiscountByLevel(discountfactor);
	}

}
